package IntgerTest;

import java.util.ArrayList;
import java.util.List;

public class IntgerTest {
  public static Integer i = 10;
  public static List<Integer> li = new ArrayList<>();
  public static void change(Integer i,List<Integer> li){
	  i++;
	  i = new Integer(100);
	  li.add(i);
  }
  public static void main(String[] args) {
	 /* change(i,li);
	  System.out.println(i);
	  System.out.println(li.toString());*/
	  
	  //基本的Integer<128两个都是==相同，大于128则堆上分配空间
	  Integer a = 10;
	  Integer b = 10;
	  System.out.println(a == b);
	  
	  int c = 10;
	  System.out.println(a == c);
	  
	  int d = 5252;
	  Integer e = 5252;
	  Integer f = 5252;
	  System.out.println(e == d);
	  System.out.println(e == f);
	  
	  Integer g = 127;
	  Integer h = 127;
	  System.out.println(g == h);
  }
}
